package com.sky.myrule;

import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Description:    自定义Ribbon配置
* @Author:         Joe
* @CreateDate:     2019/10/25 15:44
*/
@Configuration
public class MyselfRule {

    @Bean
    public IRule myRule(){
        //return new RandomRule();//随机
        //return new RoundRobinRule();//默认轮询；每台一次
        return new RandomRule_ZDY();//自定义每台访问5次

    }
}
